<include file="public:header"/>
<div class="seltpye_y">
    <div class="tit">企业认证</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.audit' value=''>select</neq>">{$Think.get.audit_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('audit'=>'','audit_cn'=>'不限'))}">不限</li>
        <li url="{:P(array('audit'=>'1','audit_cn'=>'已通过'))}">已通过</li>
        <li url="{:P(array('audit'=>'2','audit_cn'=>'待认证'))}">待认证<if condition="$count"><span style="color:#FF0000">({$count})</span></if></li>
        <li url="{:P(array('audit'=>'3','audit_cn'=>'未通过'))}">未通过</li>
        <li url="{:P(array('audit'=>'0','audit_cn'=>'未认证'))}">未认证</li>
    </div>
</div>
<if condition="C('apply.Sincerity')">
    <div class="seltpye_y">
        <div class="tit">诚聘通</div>
        <div class="ct">
            <div class="txt <neq name='Think.get.famous' value=''>select</neq>">{$Think.get.famous_cn|default='不限'}</div>
        </div>
        <div class="downlist">
            <li url="{:P(array('famous'=>'','famous_cn'=>'不限'))}">不限</li>
            <li url="{:P(array('famous'=>'1','famous_cn'=>'诚聘通'))}">诚聘通</li>
            <li url="{:P(array('famous'=>'0','famous_cn'=>'非诚聘通'))}">非诚聘通</li>
        </div>
    </div>
</if>
<div class="seltpye_y">
    <div class="tit">套餐类型</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.setmeal_id' value=''>select</neq>">{$Think.get.setmeal_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('setmeal_id'=>'','setmeal_cn'=>'不限'))}">不限</li>
        <volist name="setmeal" id="vo">
            <li url="{:P(array('setmeal_id'=>$key,'setmeal_cn'=>$vo))}">{$vo}</li>
        </volist>
    </div>
</div>
<div class="seltpye_y">
    <div class="tit">注册时间</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.settr' value=''>select</neq>">{$Think.get.settr_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('settr'=>'','settr_cn'=>'不限'))}">不限</li>
        <li url="{:P(array('settr'=>'3','settr_cn'=>'三天内'))}">三天内</li>
        <li url="{:P(array('settr'=>'7','settr_cn'=>'一周内'))}">一周内</li>
        <li url="{:P(array('settr'=>'30','settr_cn'=>'一月内'))}">一月内</li>
        <li url="{:P(array('settr'=>'180','settr_cn'=>'半年内'))}">半年内</li>
        <li url="{:P(array('settr'=>'360','settr_cn'=>'一年内'))}">一年内</li>
    </div>
</div>
<div class="seltpye_y">
    <div class="tit">套餐到期</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.overtime' value=''>select</neq>">{$Think.get.overtime_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('overtime'=>'','overtime_cn'=>'不限'))}">不限</li>
        <li url="{:P(array('overtime'=>'3','overtime_cn'=>'三天内'))}">三天内</li>
        <li url="{:P(array('overtime'=>'7','overtime_cn'=>'一周内'))}">一周内</li>
        <li url="{:P(array('overtime'=>'30','overtime_cn'=>'一月内'))}">一月内</li>
        <li url="{:P(array('overtime'=>'-1','overtime_cn'=>'半年内'))}">半年内</li>
    </div>
</div>
<div class="seltpye_y">
    <div class="tit">微信绑定</div>
    <div class="ct">
        <div class="txt <neq name='Think.get.is_bind' value=''>select</neq>">{$Think.get.is_bind_cn|default='不限'}</div>
    </div>
    <div class="downlist">
        <li url="{:P(array('is_bind'=>'','is_bind_cn'=>'不限'))}">不限</li>
        <li url="{:P(array('is_bind'=>'1','is_bind_cn'=>'绑定'))}">绑定</li>
        <li url="{:P(array('is_bind'=>'0','is_bind_cn'=>'未绑定'))}">未绑定</li>
    </div>
</div>
<div class="clear"></div>

<form id="form1" name="form1" method="post" action="{:U('company/delete_company')}">
    <div class="list_th">
        <div class="td" style=" width:20%;">
            <label id="chkAll" class="left_padding">
                <input type="checkbox" name="chkAll" id="chk" title="全选/反选"/>公司名称
            </label>
        </div>
        <div class="td" style=" width:4%; text-align: right;">&nbsp;</div>
        <div class="td" style=" width:8%;">企业认证</div>
        <if condition="C('apply.Sincerity')">
            <div class="td center" style=" width:4%;">诚聘通</div>
        </if>
        <div class="td center" style=" width:8%;">实地认证</div>
        <div class="td center" style=" width:8%;">创建时间</div>
        <div class="td center" style=" width:8%;">刷新时间</div>
        <div class="td center" style=" width:8%;">套餐名称</div>
        <div class="td center" style=" width:8%;">在招职位</div>
        <div class="td" style=" width:19%;">操作</div>
        <div class="clear"></div>
    </div>

    <volist name="list" id="vo">
        <div class="list_tr link_black">
            <div class="td" style=" width:20%;">
                <div class="left_padding striking">
                    <input name="y_id[]" type="checkbox" id="id" value="{$vo['uid']}"/>
                    <!--<a href="{$vo['company_url']}" target="_blank">{$vo['companyname']}</a>-->
                    <a href="{:U('company/info',array('id'=>$vo['id'],'_k_v'=>$vo['uid']))}" target="_blank">{$vo.companyname}</a>
                    <span style="color:#999999;">(uid:{$vo['uid']})</span>
                    <if condition="$vo['audit'] eq 1">&nbsp;<span style="color: #009900" title="已认证">[证]</span></if>
                    <if condition="$vo['famous'] eq 1">&nbsp;<span style="color: #FF9900" title="诚聘通">[诚]</span></if>
                    <if condition="$vo['is_bind']">
                        <span class="weixin_bind">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    </if>
                </div>
            </div>
            <div class="td link_blue" style=" width: 4%; text-align: right;">
                <if condition="$vo['certificate_img']">
                    <a href="{:attach($vo['certificate_img'],'certificate_img')}" target="_blank" title="点击查看">[证件]</a>&nbsp;
                    <else/>&nbsp;
                </if>
            </div>
            <div class="td" style=" width:8%;">
                <if condition="$vo['audit'] eq 0">未认证</if>
                <if condition="$vo['audit'] eq 1"><span style="color: #009900">已通过</span></if>
                <if condition="$vo['audit'] eq 2"><span style="color:#FF3300">待认证</span></if>
                <if condition="$vo['audit'] eq 3">未通过</if>
                <span class="view audit_log" title="查看日志" parameter="uid={$vo['uid']}">&nbsp;&nbsp;&nbsp;</span>
            </div>
            <if condition="C('apply.Sincerity')">
                <div class="td center" style=" width:4%;">
                    <if condition="$vo['famous'] eq 1">
                        <span style="color: #FF6600" title="诚聘通">是</span>
                        <else />
                        <span style="color: #999999">否</span>
                    </if>
                    <span class="view famous_log" title="查看日志" parameter="uid={$vo['uid']}">&nbsp;&nbsp;&nbsp;</span>
                </div>
            </if>
            <div class="td center" style=" width:8%;"><eq name="vo['report_open']" value="1"><span style="color: #009900" title="已认证">是</span><eq name="vo['report']['status']" value="0">&nbsp;<span style="color: #999999">[不对外显示]</span></eq><else />否</eq></div>
            <div class="td center" style=" width:8%;">{:admin_date($vo['addtime'])}</div>
            <div class="td center" style=" width:8%;">{:admin_date($vo['refreshtime'])}</div>
            <div class="td center" style=" width:8%;">
                <if condition="$vo['setmeal_name']">
                    <span <if condition="$vo['setmeal_id'] neq '1'">style="color: #FF6600"</if>>{$vo['setmeal_name']}</span>
                    <else />
                    <span style="color:#FF3300">无套餐</span>
                </if>
                <!--<span class="view setmeal_detail" title="套餐详情" parameter="uid={$vo['uid']}">&nbsp;&nbsp;&nbsp;</span>-->
            </div>
            <div class="td center" style=" width:8%;">
                {$vo['jobs_count']}
            </div>
            <div class="td edit" style=" width:19%;">
                <!--<a href="javascript:void(0);" class="business" parameter="uid={$vo['uid']}&utype=1" hideFocus="true">业务</a>-->
                <a href="{:U('edit_company',array('uid'=>$vo['uid'],'_k_v'=>$vo['id']))}">编辑</a>
                <a href="javascript:void(0);" class="blue company_log" parameter="uid={$vo['uid']}">日志</a>
                <!--<a href="{:U('Company/statistics_visitor',array('id'=>$vo['id'],'uid'=>$vo['uid'],'utype'=>1,'_k_v'=>$vo['id']))}">统计</a>-->
                <!--<a href="javascript:;" class="J_message" parameter="uid={$vo['uid']}">发消息</a>-->
                <!--<a href="javascript:;" class="J_migration" data-url="{:U('CompanyMigration/create',array('uid'=>$vo['uid']))}">迁移</a>-->
            </div>
            <div class="clear"></div>
        </div>
    </volist>
</form>

<empty name="list">
    <div class="list_empty">没有任何信息！</div>
</empty>

<div class="list_foot">
    <div class="btnbox">
        <input type="button" class="admin_submit" id="ButAdd" value="添加企业" onclick="window.location.href='{:U('add')}'"/>
        <input type="button" class="admin_submit" id="ButAudit" value="认证企业"/>
        <input type="button" class="admin_submit" id="ButConsultant" value="设置顾问"/>
        <if condition="$apply['Export']">
            <input type="button" class="admin_submit" id="ExPort" value="导出"/>
            <input type="button" class="admin_submit" id="ExPort_s" value="批量导出"/>
        </if>
        <input type="button" class="admin_submit" id="ButRefresh" value="刷新"/>
        <input type="button" class="admin_submit" id="ButDel" value="删除"/>
    </div>

    <div class="footso">
        <form action="?" method="get">
            <div class="sobox">
                <input type="hidden" name="m" value="{:C('admin_alias')}">
                <input type="hidden" name="c" value="{:CONTROLLER_NAME}">
                <input type="hidden" name="a" value="{:ACTION_NAME}">
                <input name="key" type="text" class="sinput" value="{$Think.get.key}"/>
                <input name="key_type" id="J_key_type_id" type="hidden" value="{$Think.get.key_type|default='1'}" />
                <input name="key_type_cn" id="J_key_type_cn" type="hidden" value="{$Think.get.key_type_cn|default='公司名'}"/>
                <input name="" type="submit" value="" class="sobtn"/>
                <div class="sotype" id="J_key_click">{$Think.get.key_type_cn|default='公司名'}</div>
                <div class="mlist" id="J_mlist">
                    <ul>
                        <li id="1" title="公司名">公司名</li>
                        <li id="2" title="公司ID">公司ID</li>
                        <li id="3" title="会员名">会员名</li>
                        <li id="4" title="会员ID">会员ID</li>
                        <li id="5" title="地址">地址</li>
                        <li id="6" title="电话">电话</li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="pages">{$page}</div>

</div>
<include file="public:footer"/>

</body>
<script type="text/javascript">
    $(document).ready(function () {
        $(".J_message").click(function () {
            $('.modal_backdrop').remove();
            $('.modal').remove();
            var qsDialog = $(this).dialog({
                title: '发消息',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/ajax_message')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        // 企业迁移
        $(".J_migration").click(function () {
            $('.modal_backdrop').remove();
            $('.modal').remove();
            var qsDialog = $(this).dialog({
                title: '账号迁移',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = $(this).data('url');
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //审核日志
        $(".audit_log").click(function () {
            var qsDialog = $(this).dialog({
                title: '审核日志',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/company_audit_log')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        $(".company_log").click(function () {
            var qsDialog = $(this).dialog({
                title: '企业日志',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/company_log')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //诚聘通记录
        $(".famous_log").click(function () {
            var qsDialog = $(this).dialog({
                title: '诚聘通',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Sincerity/Admin/famous_log')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //套餐详情
        $(".setmeal_detail").click(function () {
            var qsDialog = $(this).dialog({
                title: '套餐详情',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/setmeal_detail')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //业务
        $(".business").click(function () {
            var qsDialog = $(this).dialog({
                title: '业务',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/business')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //批量审核
        $("#ButAudit").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '审核企业',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/company_audit')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        //批量刷新
        $("#ButRefresh").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '刷新',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/refresh_company')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        //点击批量删除
        $("#ButDel").click(function () {
            if (confirm('删除企业，该企业所属会员、职位、简历信息将同步删除')) {
                $("form[name=form1]").attr("action", "{:U('delete_company')}");
                $("form[name=form1]").submit();
            }
        });
        /*//批量删除
        $("#ButDel").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '删除企业',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/delete_company')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });*/
        //设置顾问
        $("#ButConsultant").click(function () {
            var ids = $("input[name='y_id[]']:checked");
            if(ids.length == 0){
                disapperTooltip('remind','请选择企业！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '设置顾问',
                    loading: true,
                    footer : false
                });
                var data = $("[name=form1]").serialize();
                var url = "{:U('Ajax/set_consultant')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        <if condition="$apply['Export']">
            //点击批量导出
            $("#ExPort").click(function () {
                var data = $("form[name=form1]").serialize();
                if(data.length == 0){
                    disapperTooltip('remind','请选择企业！');
                    qsDialog.hide();
                }
                $("form[name=form1]").attr("action", "{:U('Export/Admin/export_company')}");
                $("form[name=form1]").submit();
            });
            $("#ExPort_s").click(function () {
                var qsDialog = $(this).dialog({
                    title: '批量导出',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Export/Admin/ajax_export_company')}";
                $.getJSON(url, function (result) {
                    qsDialog.setContent(result.data);
                });
            });
        </if>
    });
</script>
</html>